<template>

  <div>
    <div class="divcss5" style="border-bottom:3px solid #eee">
    <h5 align="left">职位信息管理>管理招聘进度>进行中</h5>
    </div>
  <el-form :model="jobInfoForm" :rules="rules" ref="jobInfoForm" label-width="100px" class="demo-jobInfoForm">
    <el-row type="flex" class="row-bg">
      <div style="font-size:12px;margin:0px 50px 20px ;width:550px;height:15px;float:left;background-color:rgba(0,255,255,0.1);">
        <div>您好！请在下面各输入框填写您要发送的通知详细信息，请保证信息的完整性和有效性，谢谢!</div>
      </div>
    </el-row>
    <el-row type="flex" class="row-bg" >
      <el-form-item label="面试时间：" prop="time">
        <el-input style="width:16em" v-model="jobInfoForm.time"></el-input>
      </el-form-item>
    </el-row>
    <el-row type="flex" class="row-bg" >
        <el-form-item label="面试地点：" prop="place">
          <el-input  style="width:16em" v-model="jobInfoForm.place"></el-input>
        </el-form-item>
    </el-row>
    <el-form-item label-width="100px" label="面试要求：" prop="description"> 
      <el-input
        type="textarea"
        :rows="4"
        placeholder="多行输入"
        v-model="jobInfoForm.description">
      </el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="submitForm('jobInfoForm')">发布</el-button>
    </el-form-item>
  </el-form> 
</div>
</template>

<script>
  export default {
    data() {
      return {
        jobInfoForm: {
          time:'',
          place:'',
          description:'',
        },
        rules: {
           time: [
            {required: true, message: '请输入面试时间' }
          ],
           place: [
            { required: true, message: '请输入面试地点'}
          ],
          description: [
            { required: true, message: '请输入面试要求'}
          ]
        }
      };
    },
    methods: {
      submitForm(formName) {
         this.$confirm('确定提交该通知信息', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
         this.$refs[formName].validate((valid) => {
          if (valid) {
          this.$alert('职位信息已成功提交，请等待管理员审核', '提示',{
          confirmButtonText: '确定',
          callback: action => {
          this.$message({
          type: 'success',
          message:'提交成功'
          });
          }
        });
          } else {
          this.$alert('表单填写不完整请检查', '提示',{
          confirmButtonText: '确定',
          callback: action => {
          this.$message({
          type: 'info',
          message:'提交失败'
          });
          }
        });
            return false;
          }
        });
      })},
      resetForm(formName) {
        this.$refs[formName].resetFields();
      },
    }
  }
</script>
<style>
.divcss5{
   margin:20px 0;
   color: rgb(144,144,144);
   height: 30px;
   }
</style>
